/*************************************************************************
	> File Name: oj-592.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2021年02月01日 星期一 08时37分42秒
 ************************************************************************/

#include <iostream>
using namespace std;
using ll = long long;

int main() {
    ll base2[10] = {1, 2, 4, 8, 16, 32};
    ll num[65] = {0};
    for (int i = 0; i <= 63; ++i) {
        int t = i;
        for (int j = 5; j >= 0; --j) {
            if (t >= base2[j]) {
                num[i]++;
                t -= base2[j];
            }
        }
    }
    char str[100005];
    cin >> str;
    ll ans = 1;
    for (int i = 0; str[i]; ++i) {
        int t;
        if (str[i] >= '0' && str[i] <= '9') {
            t = str[i] - '0';
        } else if (str[i] >= 'A' && str[i] <= 'Z') {
            t = str[i] - 'A' + 10;
        } else if (str[i] >= 'a' && str[i] <= 'z') {
            t = str[i] - 'a' + 36;
        } else if (str[i] == '-') {
            t = 62;
        } else {
            t = 63;
        }
        int x = 6 - num[t];
        for (int j = 0; j < x; ++j) {
            ans = ans * 3 % 1000000007;
        }
    }
    cout << ans << endl;
    return 0;
}
